/*
 * Daniel R Padilla
 *
 * Copyright (c) 2008, Daniel R Padilla
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, write to:
 * Free Software Foundation, Inc.
 * 51 Franklin Street, Fifth Floor
 * Boston, MA  02110-1301  USA
 */
package org.databasefacade.table.column.datatype;

import org.databasefacade.translator.Translator;



public interface DataType {
    public static final short ARRAY_TYPE = java.sql.Types.ARRAY;
    public static final short BIGINT_TYPE = java.sql.Types.BIGINT;
    public static final short BINARY_TYPE = java.sql.Types.BINARY;
    public static final short BIT_TYPE = java.sql.Types.BIT;
    public static final short BLOB_TYPE = java.sql.Types.BLOB;
    public static final short CHAR_TYPE = java.sql.Types.CHAR;
    public static final short CLOB_TYPE = java.sql.Types.CHAR;
    public static final short BOOLEAN_TYPE = 3737;
    public static final short DATE_TYPE = java.sql.Types.DATE;
    public static final short DECIMAL_TYPE = java.sql.Types.DECIMAL;
    public static final short DISTINCT_TYPE = java.sql.Types.DISTINCT;
    public static final short DOUBLE_TYPE = java.sql.Types.DOUBLE;
    public static final short FLOAT_TYPE = java.sql.Types.FLOAT;
    public static final short FOREIGN_KEY_TYPE = 8787;
    public static final short INTEGER_TYPE = java.sql.Types.INTEGER;
    public static final short JAVA_OBJECT_TYPE = java.sql.Types.JAVA_OBJECT;
    public static final short LONGVARBINARY_TYPE  = java.sql.Types.LONGVARBINARY;
    public static final short LONGVARCHAR_TYPE = java.sql.Types.LONGVARCHAR;
    public static final short NULL_TYPE = java.sql.Types.NULL;
    public static final short NUMERIC_TYPE = java.sql.Types.NUMERIC;
    public static final short OTHER_TYPE = java.sql.Types.OTHER;
    public static final short MONEY_TYPE = 1010;
    public static final short AUTO_INCREMENT_TYPE = 1111;
    public static final short REAL_TYPE = java.sql.Types.REAL;
    public static final short REF_TYPE = java.sql.Types.REF;
    public static final short SMALLINT_TYPE = java.sql.Types.SMALLINT;
    public static final short STRUCT_TYPE = java.sql.Types.STRUCT;
    public static final short STRING_TYPE = java.sql.Types.VARCHAR;
    public static final short TIME_TYPE =  java.sql.Types.TIME;
    public static final short TIMESTAMP_TYPE =  java.sql.Types.TIMESTAMP;
    public static final short TINYINT_TYPE =  java.sql.Types.TINYINT;
    public static final short VARBINARY_TYPE =  java.sql.Types.VARBINARY;
        
    public void setJavaType(String java);
    public String getJavaType();
    public void setSqlType(Translator translator, DataType type);
    public void setSqlType(String sql);
    public String getSqlType();
    public void setLength(int len);
    public int getLength();
    public void setPrecision(int prec);
    public int getPrecision();
    public void setScale(int sc);
    public int getScale();
    public void setColumnType(short type);
    public short getColumnType();
    public void setNullable(String nill);
    public String getNullable();
    public DataType getCopy(Translator translator);
    public Object getValueInstance(Object data);
}
